﻿Imports utilitiesLibrary

Public Class search
    Inherits System.Web.UI.Page
    Dim objDb As DBConnect
    Dim sql As String



    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        objDb = Session("db")

        If Not IsPostBack Then
            
        End If
    End Sub


    Protected Sub btnSearch_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnSearch.Click
        Dim searchQuery As String

        searchQuery = txtCity.Text
        sql = "SELECT * FROM AirportCode WHERE CityName LIKE '" & searchQuery & "%'" '
        'MsgBox(sql)
        gvSearch.DataSource = objDb.getDataSet(sql)
        gvSearch.DataBind()
    End Sub
End Class